#题目一#####
x=1
中国="china"
.c="我爱你中国"
#题目二####
A<-(1:10)
print(A)
name=c("小明","小米","小红")
a<-(1:3)
tapply(a,name,mean)
#第三题#####
a=(1:10)
b<-(11:20)
c<-(21:30)
x=c("a","b","c","d","e","a","b","c","d","e")
d<-data.frame(a,b,c,x)
print(d)
#第四题#####
#第一小题#####
num=sample(1:50,10,replace = TRUE)
print(num)
i=0
for (a in num)
{
  if(a>10){i=i+1}
}
print(i)

#第2小题#####
num=sample(1:50,10,replace = TRUE)
print(num)
n=length(num)
for(i in 1:(n-1))
{
  for(j in 1:(n-i))
  {
    if(num[j] < num[j+1])
    {
      temp=num[j]
      num[j]=num[j+1]
      num[j+1]=temp
    }
  }
}
print(num)
